package com.antball.dd.decorator;

import com.antball.dd.decorator.starbucks.*;

public class Main {

    public static void main(String[] args) {
	    // 适配器
        Component c = new ConcreteComponent();
        Decorator d=new ConcreteDecorator(c,"111");
        Decorator dd = new ConcreteDecorator(d,"222");
        dd.request();

        System.out.println("----------------");

        Drink dk = new Coffee();
        dk=new Ice(dk);
        dk=new Sugar(dk);
        System.out.println("订单信息："+dk.getDescription());
        System.out.println("订单价格："+dk.cost());

    }
}
